package cn.codesugar.hilt

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.example.android.hilt.R
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

private const val TAG = "HiltActivity"

@AndroidEntryPoint
class HiltActivity : AppCompatActivity() {

    @Inject lateinit var httpObject: HttpObject
    @Inject lateinit var httpObject2: HttpObject
    @Inject lateinit var testInterface: TestInterface

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_hilt)
        Log.i(TAG, httpObject.hashCode().toString())
        Log.i(TAG, httpObject2.hashCode().toString())
        testInterface.method()
    }
}